#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
void FindNum(int* arr,int n,int* pnum1,int*pnum2)
{
	int x = 0;
	int number = 0;
	for (int i = 0; i < n; i++)
	{
		number^=arr[i];
	}
	while (1)
	{
		if (number & 1 == 1)
		{
			break;
		}
		x++;
		number >>= 1;
	}
	for (int i = 0; i < n; i++)
	{
		if ((arr[i] >> x) & 1)
		{
			*pnum1^= arr[i];
		}
		else
		{
			*pnum2^= arr[i];
		}
	}
	printf("%d %d\n", *pnum1, *pnum2);
}
int main()
{
	int arr[10] = { 1,2,3,4,5,1,2,3,4,6 };
	int pnum1[10] = { 0 };
	int pnum2[10] = { 0 };
	int sz = sizeof(arr) / sizeof(arr[0]);
	FindNum(arr,sz,pnum1,pnum2);
	return 0;
}